home *** CD-ROM | disk | FTP | other *** search
/ Introducing the New Way to Shop From Home / Introducing the New Way to Shop From Home (Iceland Foods) (2003).iso / pc / MacStepbyStep.dxr / Internal_196_update button 3.ls < prev    next >
Encoding:
Text File  |  2003-01-01  |  11.5 KB  |  248 lines

  1. on mouseDown
  2.   global gQuantity3, gQuantityTotal3, gCost3, gTotalCost, gTotalSaving, gChickenSaving, gBreadSaving, gSugarSaving, gProductTypes, gList1Quant, gList1Prod, gList1Cost, gList1Total, gList2Quant, gList2Prod, gList2Cost, gList2Total, gList3Quant, gList3Prod, gList3Cost, gList3Total, gList4Quant, gList4Prod, gList4Cost, gList4Total, gList5Quant, gList5Prod, gList5Cost, gList5Total, gList6Quant, gList6Prod, gList6Cost, gList6Total, gList7Quant, gList7Prod, gList7Cost, gList7Total, gList8Quant, gList8Prod, gList8Cost, gList8Total, gList9Quant, gList9Prod, gList9Cost, gList9Total, gList10Quant, gList10Prod, gList10Cost, gList10Total, gList11Quant, gList11Prod, gList11Cost, gList11Total, gList12Quant, gList12Prod, gList12Cost, gList12Total, gList13Quant, gList13Prod, gList13Cost, gList13Total
  3.   if gQuantity3 = member(71).text then
  4.     nothing()
  5.   else
  6.     set the floatPrecision to 0
  7.     gQuantity3 = member(71).text
  8.     gQuantity3 = integer(gQuantity3)
  9.   end if
  10.   if gList3Prod = string("Tate & Lyle Granulated Sugar") then
  11.     set the floatPrecision to 2
  12.     member(205).text = string(gSugarSaving)
  13.   else
  14.     if gList3Quant = 0 then
  15.       nothing()
  16.     else
  17.       if gQuantity3 > 0 then
  18.         set the floatPrecision to 2
  19.         if gList3Prod = string("Iceland 10 (1.6kg) Chicken Drumsticks") then
  20.           gCost3 = gQuantity3 / 2 * 4.0
  21.           if (gQuantity3 mod 2) = 0 then
  22.             gChickenSaving = gQuantity3 * 0.48999999999999999
  23.           else
  24.             gCost3 = gCost3 + 2.49000000000000021
  25.             gChickenSaving = (gQuantity3 - 1) * 0.48999999999999999
  26.           end if
  27.           gTotalSaving = gChickenSaving + gBreadSaving + gSugarSaving
  28.           gList3Quant = gQuantity3
  29.           gList3Total = gCost3
  30.           gTotalCost = gList1Total + gList2Total + gList3Total + gList4Total + gList5Total + gList6Total + gList7Total + gList8Total + gList9Total + gList10Total + gList11Total + gList12Total + gList13Total
  31.           member(89).text = string(gList3Quant & "x")
  32.           member(91).text = gList3Prod
  33.           member(158).text = string("¬£" & gList3Total)
  34.           member(105).text = string("¬£" & gTotalSaving)
  35.           member(150).text = string("¬£" & gTotalCost)
  36.           member(205).text = string(gChickenSaving)
  37.         else
  38.           set the floatPrecision to 2
  39.           if gList3Prod = string("Kingsmill 800g Wmeal Bread") then
  40.             gCost3 = gQuantity3 / 2 * 1.0
  41.             if (gQuantity3 mod 2) = 0 then
  42.               gBreadSaving = gQuantity3 * 0.14999999999999999
  43.             else
  44.               gCost3 = gCost3 + 0.65000000000000002
  45.               gBreadSaving = (gQuantity3 - 1) * 0.14999999999999999
  46.             end if
  47.             gTotalSaving = gChickenSaving + gBreadSaving + gSugarSaving
  48.             gList3Quant = gQuantity3
  49.             gList3Total = gCost3
  50.             gTotalCost = gList1Total + gList2Total + gList3Total + gList4Total + gList5Total + gList6Total + gList7Total + gList8Total + gList9Total + gList10Total + gList11Total + gList12Total + gList13Total
  51.             member(89).text = string(gList3Quant & "x")
  52.             member(91).text = gList3Prod
  53.             member(158).text = string("¬£" & gList3Total)
  54.             member(105).text = string("¬£" & gTotalSaving)
  55.             member(150).text = string("¬£" & gTotalCost)
  56.             member(205).text = string(gBreadSaving)
  57.           else
  58.             set the floatPrecision to 2
  59.             gCost3 = gQuantity3 * gList3Cost
  60.             gList3Quant = gQuantity3
  61.             gList3Total = gCost3
  62.             gTotalCost = gList1Total + gList2Total + gList4Total + gList5Total + gList6Total + gList7Total + gList8Total + gList9Total + gList10Total + gList11Total + gList12Total + gList13Total + (gQuantity3 * gList3Cost)
  63.             member(89).text = string(gList3Quant & "x")
  64.             member(91).text = gList3Prod
  65.             member(158).text = string("¬£" & gList3Total)
  66.             member(150).text = string("¬£" & gTotalCost)
  67.             member(205).text = string("0.00")
  68.           end if
  69.         end if
  70.       else
  71.         if gList3Prod = string("Iceland 10 (1.6kg) Chicken Drumsticks") then
  72.           gChickenSaving = 0.0
  73.         else
  74.           if gList3Prod = string("Kingsmill 800g Wmeal Bread") then
  75.             gBreadSaving = 0.0
  76.           else
  77.             nothing()
  78.           end if
  79.         end if
  80.         set the floatPrecision to 2
  81.         gTotalSaving = gChickenSaving + gBreadSaving + gSugarSaving
  82.         member(105).text = string("¬£" & gTotalSaving)
  83.         gProductTypes = gProductTypes - 1
  84.         member(104).text = string(gProductTypes)
  85.         gList3Quant = gList4Quant
  86.         gList3Prod = gList4Prod
  87.         gList3Cost = gList4Cost
  88.         gList3Total = gList4Total
  89.         gList4Quant = gList5Quant
  90.         gList4Prod = gList5Prod
  91.         gList4Cost = gList5Cost
  92.         gList4Total = gList5Total
  93.         gList5Quant = gList6Quant
  94.         gList5Prod = gList6Prod
  95.         gList5Cost = gList6Cost
  96.         gList5Total = gList6Total
  97.         gList6Quant = gList7Quant
  98.         gList6Prod = gList7Prod
  99.         gList6Cost = gList7Cost
  100.         gList6Total = gList7Total
  101.         gList7Quant = gList8Quant
  102.         gList7Prod = gList8Prod
  103.         gList7Cost = gList8Cost
  104.         gList7Total = gList8Total
  105.         gList8Quant = gList9Quant
  106.         gList8Prod = gList9Prod
  107.         gList8Cost = gList9Cost
  108.         gList8Total = gList9Total
  109.         gList9Quant = gList10Quant
  110.         gList9Prod = gList10Prod
  111.         gList9Cost = gList10Cost
  112.         gList9Total = gList10Total
  113.         gList10Quant = gList11Quant
  114.         gList10Prod = gList11Prod
  115.         gList10Cost = gList11Cost
  116.         gList10Total = gList11Total
  117.         gList11Quant = gList12Quant
  118.         gList11Prod = gList12Prod
  119.         gList11Cost = gList12Cost
  120.         gList11Total = gList12Total
  121.         gList12Quant = gList13Quant
  122.         gList12Prod = gList13Prod
  123.         gList12Cost = gList13Cost
  124.         gList12Total = gList13Total
  125.         gList13Quant = 0
  126.         gList13Prod = "none"
  127.         gList13Cost = 0
  128.         gList13Total = 0
  129.         gTotalCost = gList1Total + gList2Total + gList3Total + gList4Total + gList5Total + gList6Total + gList7Total + gList8Total + gList9Total + gList10Total + gList11Total + gList12Total + gList13Total
  130.         member("productp21_blank3").image = member("productp21_blank4").image
  131.         member(205).text = member(206).text
  132.         if gList4Prod = string("Iceland 9" & numToChar(34) & " Pep & Ham D/Pan Pizza") then
  133.           member("productp21_blank4").image = member("productp21_pizpep").image
  134.           member(206).text = string("0.00")
  135.         else
  136.           if gList4Prod = string("Iceland 9" & numToChar(34) & " Veg Fst T/Crispy Pizza") then
  137.             member("productp21_blank4").image = member("productp21_pizveg").image
  138.             member(206).text = string("0.00")
  139.           else
  140.             if gList4Prod = string("Iceland 9" & numToChar(34) & " Char Ckn T/Crispy Pizza") then
  141.               member("productp21_blank4").image = member("productp21_pizchar").image
  142.               member(206).text = string("0.00")
  143.             else
  144.               if gList4Prod = string("Iceland 9" & numToChar(34) & " Chse Melt D/Pan Pizza") then
  145.                 member("productp21_blank4").image = member("productp21_pizchee").image
  146.                 member(206).text = string("0.00")
  147.               else
  148.                 if gList4Prod = string("Iceland 10" & numToChar(34) & " Mt Comb S/Crust Pizza") then
  149.                   member("productp21_blank4").image = member("productp21_pizcom").image
  150.                   member(206).text = string("0.00")
  151.                 else
  152.                   if gList4Prod = string("Iceland 10 (1.6kg) Chicken Drumsticks") then
  153.                     member("productp21_blank4").image = member("productp21_drum").image
  154.                     member(206).text = string(gChickenSaving)
  155.                   else
  156.                     if gList4Prod = string("Birds Eye 4 Beef Quarter Pounders") then
  157.                       member("productp21_blank4").image = member("productp21_beefburg").image
  158.                       member(206).text = string("0.00")
  159.                     else
  160.                       if gList4Prod = string("Iceland 2 Jumbo Haddock Fillets") then
  161.                         member("productp21_blank4").image = member("productp21_haddock").image
  162.                         member(206).text = string("0.00")
  163.                       else
  164.                         if gList4Prod = string("Napolina 400g Chopped Tomatoes") then
  165.                           member("productp21_blank4").image = member("productp21_toms").image
  166.                           member(206).text = string("0.00")
  167.                         else
  168.                           if gList4Prod = string("Iceland 500g Pasta Shells") then
  169.                             member("productp21_blank4").image = member("productp21_pasta").image
  170.                             member(206).text = string("0.00")
  171.                           else
  172.                             if gList4Prod = string("Kingsmill 800g Wmeal Bread") then
  173.                               member("productp21_blank4").image = member("productp21_bread").image
  174.                               member(206).text = string(gBreadSaving)
  175.                             else
  176.                               if gList4Prod = string("Tate & Lyle Granulated Sugar") then
  177.                                 member("productp21_blank4").image = member("productp21_sugar").image
  178.                                 member(206).text = string(gSugarSaving)
  179.                               else
  180.                                 member("productp21_blank4").image = member("productp21_blank").image
  181.                               end if
  182.                             end if
  183.                           end if
  184.                         end if
  185.                       end if
  186.                     end if
  187.                   end if
  188.                 end if
  189.               end if
  190.             end if
  191.           end if
  192.         end if
  193.       end if
  194.       member(79).text = string(gList1Quant & "x")
  195.       member(75).text = gList1Prod
  196.       member(80).text = string("¬£" & gList1Total)
  197.       member(150).text = string("¬£" & gTotalCost)
  198.       if gList2Quant = 0 then
  199.         member(74).text = string(EMPTY)
  200.         member(92).text = EMPTY
  201.         member(94).text = string(EMPTY)
  202.         sprite(69).visible = 1
  203.       else
  204.         member(74).text = string(gList2Quant & "x")
  205.         member(92).text = gList2Prod
  206.         member(94).text = string("¬£" & gList2Total)
  207.       end if
  208.       if gList3Quant = 0 then
  209.         member(89).text = string(EMPTY)
  210.         member(91).text = EMPTY
  211.         member(158).text = string(EMPTY)
  212.         sprite(70).visible = 1
  213.       else
  214.         member(89).text = string(gList3Quant & "x")
  215.         member(91).text = gList3Prod
  216.         member(158).text = string("¬£" & gList3Total)
  217.       end if
  218.       if gList4Quant = 0 then
  219.         member(159).text = string(EMPTY)
  220.         member(160).text = EMPTY
  221.         member(162).text = string(EMPTY)
  222.         sprite(71).visible = 1
  223.       else
  224.         member(159).text = string(gList4Quant & "x")
  225.         member(160).text = gList4Prod
  226.         member(162).text = string("¬£" & gList4Total)
  227.       end if
  228.       member(73).text = string("¬£" & gTotalCost)
  229.       gQuantity1 = gList1Quant
  230.       gQuantityTotal1 = gList1Quant
  231.       gCost1 = 0
  232.       member(69).text = string(gList1Quant)
  233.       gQuantity2 = gList2Quant
  234.       gQuantityTotal2 = gList2Quant
  235.       gCost2 = 0
  236.       member(70).text = string(gQuantity2)
  237.       gQuantity3 = gList3Quant
  238.       gQuantityTotal3 = gList3Quant
  239.       gCost3 = 0
  240.       member(71).text = string(gQuantity3)
  241.       gQuantity4 = gList4Quant
  242.       gQuantityTotal4 = gList4Quant
  243.       gCost4 = 0
  244.       member(81).text = string(gQuantity4)
  245.     end if
  246.   end if
  247. end
  248.